﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TelerikExtensions {
	public static class Extensions {
		public static Telerik.Web.UI.GridSortOrder Convert(this Dimok.Shared.ListSortDirection lsd) {
			return (Telerik.Web.UI.GridSortOrder)Enum.Parse(typeof(Telerik.Web.UI.GridSortOrder), lsd + "");
		}
		public static Dimok.Shared.ListSortDirection Convert(this Telerik.Web.UI.GridSortOrder lsd) {
			return (Dimok.Shared.ListSortDirection)Enum.Parse(typeof(Dimok.Shared.ListSortDirection), lsd + "");
		}
		public static T ConvertEnum<T>(this string v) {
			return (T)Enum.Parse(typeof(T), v);
		}
	}
}
